$(function(){
	  $(".showmap").on('click', function() {
	  	console.log(1)
		var showtrack = {
			offset: function(othis) {
				var type = othis.data('type'),
					text = othis.text();

				layer.open({
					type: 1,
					area: ['800px', '800px'],
					title: false,
					offset: type //具体配置参考：http://www.layui.com/doc/modules/layer.html#offset
						,
					id: 'layerDemo' + type //防止重复弹出
						,
					content: '<div id="showlocation" style="width:99%;height:99%;margin:1%"></div>',
					btn: ['确认'],
					success: function(layero) {
						var btn = layero.find('.layui-layer-btn');
						//					layer.closeAll();
					},
					btn2: function() {
						layer.closeAll();
					},
					btnAlign: 'c' //按钮居中
						,
					shade: 0 //不显示遮罩
						,
					yes: function() {
						layer.closeAll();
					}
				});
			}
		};
		var othis = $(this),
			method = othis.data('method');
		showtrack[method] ? showtrack[method].call(this, othis) : '';
		var map = new AMap.Map('showlocation', {
			resizeEnable: true,
			zoom: 11,
			center: [118.57, 24.82]
		});
	})
})
